package cn.tedu.kcircle.category.admin.infra.converter;

import cn.tedu.kcircle.category.admin.protocol.param.CategoryAdminAddParam;
import cn.tedu.kcircle.category.admin.protocol.param.CategoryAdminUpdateParam;
import cn.tedu.kcircle.category.dao.entiry.CategoryDO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@Component
public class CategoryAdminConverter {
    public CategoryDO param2DO(CategoryAdminAddParam categoryAdminAddParam){
        CategoryDO categoryDO = new CategoryDO();
        BeanUtils.copyProperties(categoryAdminAddParam,categoryDO);
        return categoryDO;
    }
    public CategoryDO param2DO(CategoryAdminUpdateParam categoryAdminUpdateParam){
        CategoryDO categoryDO = new CategoryDO();
        BeanUtils.copyProperties(categoryAdminUpdateParam,categoryDO);
        return categoryDO;
    }
}
